/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.caresms.model.impl;

import com.caresms.model.Sms_Master;

import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.model.CacheModel;

import java.io.Serializable;

import java.util.Date;

/**
 * The cache model class for representing Sms_Master in entity cache.
 *
 * @author cc
 * @see Sms_Master
 * @generated
 */
public class Sms_MasterCacheModel implements CacheModel<Sms_Master>,
	Serializable {
	@Override
	public String toString() {
		StringBundler sb = new StringBundler(27);

		sb.append("{SmsId=");
		sb.append(SmsId);
		sb.append(", companyId=");
		sb.append(companyId);
		sb.append(", userId=");
		sb.append(userId);
		sb.append(", SmsContent=");
		sb.append(SmsContent);
		sb.append(", createDate=");
		sb.append(createDate);
		sb.append(", Approved_By=");
		sb.append(Approved_By);
		sb.append(", isActive=");
		sb.append(isActive);
		sb.append(", Sms_chars_Size=");
		sb.append(Sms_chars_Size);
		sb.append(", field1=");
		sb.append(field1);
		sb.append(", field2=");
		sb.append(field2);
		sb.append(", field3=");
		sb.append(field3);
		sb.append(", field4=");
		sb.append(field4);
		sb.append(", field5=");
		sb.append(field5);
		sb.append("}");

		return sb.toString();
	}

	public Sms_Master toEntityModel() {
		Sms_MasterImpl sms_MasterImpl = new Sms_MasterImpl();

		sms_MasterImpl.setSmsId(SmsId);
		sms_MasterImpl.setCompanyId(companyId);
		sms_MasterImpl.setUserId(userId);

		if (SmsContent == null) {
			sms_MasterImpl.setSmsContent(StringPool.BLANK);
		}
		else {
			sms_MasterImpl.setSmsContent(SmsContent);
		}

		if (createDate == Long.MIN_VALUE) {
			sms_MasterImpl.setCreateDate(null);
		}
		else {
			sms_MasterImpl.setCreateDate(new Date(createDate));
		}

		sms_MasterImpl.setApproved_By(Approved_By);
		sms_MasterImpl.setIsActive(isActive);
		sms_MasterImpl.setSms_chars_Size(Sms_chars_Size);

		if (field1 == null) {
			sms_MasterImpl.setField1(StringPool.BLANK);
		}
		else {
			sms_MasterImpl.setField1(field1);
		}

		sms_MasterImpl.setField2(field2);
		sms_MasterImpl.setField3(field3);

		if (field4 == Long.MIN_VALUE) {
			sms_MasterImpl.setField4(null);
		}
		else {
			sms_MasterImpl.setField4(new Date(field4));
		}

		if (field5 == null) {
			sms_MasterImpl.setField5(StringPool.BLANK);
		}
		else {
			sms_MasterImpl.setField5(field5);
		}

		sms_MasterImpl.resetOriginalValues();

		return sms_MasterImpl;
	}

	public long SmsId;
	public long companyId;
	public long userId;
	public String SmsContent;
	public long createDate;
	public long Approved_By;
	public boolean isActive;
	public int Sms_chars_Size;
	public String field1;
	public boolean field2;
	public int field3;
	public long field4;
	public String field5;
}